#ifndef LOGINWINDOW_H
#define LOGINWINDOW_H

#include <QWidget>
#include <QMessageBox>

QT_BEGIN_NAMESPACE
class QLineEdit;
class QPushButton;
QT_END_NAMESPACE

namespace Ui {
class LoginWindow;
}

class MainWindow;

class LoginWindow : public QWidget
{
    Q_OBJECT

public:
    explicit LoginWindow(QWidget *parent = nullptr);
    ~LoginWindow();

private slots:
    void onLoginButtonClicked();

protected:
    bool eventFilter(QObject *obj, QEvent *event) override;

private:
    Ui::LoginWindow *ui;
    MainWindow *mainWindow;
    
    // 默认登录凭据
    const QString DEFAULT_USERNAME = "ARM";
    const QString DEFAULT_PASSWORD = "PYT";
    
    bool validateLogin(const QString &username, const QString &password);
};

#endif // LOGINWINDOW_H